package com.inco.cloud.auth;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.concurrent.TimeUnit;
//远程调用
@EnableFeignClients
//注册服务，使用nacos时使用
@EnableDiscoveryClient
@SpringBootApplication(scanBasePackages = {"com.inco.cloud.common", "com.inco.cloud.auth"})
public class AuthApplication{
    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(AuthApplication.class, args);
        String userName = applicationContext.getEnvironment().getProperty("user.name");
        String userAge = applicationContext.getEnvironment().getProperty("user.age");
        String password = applicationContext.getEnvironment().getProperty("password");
        System.err.println("user name :"+userName+"; age: "+userAge+"; password："+password);
    }
}